package com.example.demo.entity;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

public class User {
    private Integer id;
    private String name;
    @Max(value = 200,message = "年龄最大不能超过200")
    @Min(value = 10,message = "年龄最小不能小于10岁")
    private Integer age;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
